<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Bootstrap-表单</title>
    <link href="bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>


<div class="container">
    <h4>垂直表单</h4>
    <form role="form">
        <div class="form-group">
            <label for="name">名称</label>
            <input type="text" placeholder="请输入名称" id="name" class="form-control">
        </div>

        <div class="form-group">
            <label for="inputfile">文件输入</label>
            <input type="file" id="inputfile">
            <p class="help-block">这里是块级帮助文本的实例</p>
        </div>

        <div class="checkbox">
            <label>
                <input type="checkbox">
                请打勾
            </label>
        </div>
        <button type="submit" class="btn btn-default">提交</button>
    </form>
</div>



<div class="container">
    <h4>内联表单</h4>
    <form class="form-inline" role="form">
        <div class="form-group">
            <label class="sr-only" for="name-inline">名称</label>
            <input type="text" class="form-control" id="name-inline" placeholder="请输入名称">
        </div>

        <div class="form-group">
            <label class="sr-only" for="inputfile-inline">文件输入</label>
            <input type="file" id="inputfile-inline">
        </div>

        <div class="checkbox">
            <label><input type="checkbox">请打勾</label>
        </div>

        <button type="submit" class="btn btn-default">提交</button>
    </form>
</div>


<div class="container">
    <h4>水平表单</h4>
    <form class="form-horizontal" role="form">
        <div class="form-group">
            <label for="name-horizontal" class="col-xs-3 control-label">名称</label>
            <div class="col-xs-9">
                <input type="text" placeholder="请输入名称" id="name-horizontal" class="form-control col-xs-10">
            </div>
        </div>

        <div class="form-group">
            <label for="inputfile-horizontal" class="col-xs-3 control-label">文件输入</label>
            <div class="col-xs-9">
                <input type="file" id="inputfile-horizontal" placeholder="请输入名字">
            </div>
        </div>

        <div class="form-group">
            <div class="col-xs-offset-3 col-xs-9">
                <div class="checkbox">
                    <label><input type="checkbox">请打勾</label>
                </div>
            </div>
        </div>

        <div class="form-group">
            <label class="col-xs-3 control-label" for="select">选择列表</label>
            <div class="col-xs-9">
                <select id="select" class="form-control">
                    <option>1</option>
                    <option>2</option>
                    <option>3</option>
                    <option>4</option>
                    <option>5</option>
                </select>
            </div>
        </div>

        <div class="form-group">
            <label class="col-xs-3 control-label" for="mulselect">可多选的选择列表</label>
            <div class="col-xs-9" >
                <select multiple id="mulselect" class="form-control">
                    <option>1</option>
                    <option>2</option>
                    <option>3</option>
                    <option>4</option>
                    <option>5</option>
                </select>
            </div>
        </div>

        <div class="form-group">
            <label class="col-xs-3 control-label">单选</label>
            <div class="radio col-xs-9">
                <label class="radio-inline"><input type="radio" name="optionsRadios">选项1</label>
                <label class="radio-inline"><input type="radio" name="optionsRadios">选项1</label>
            </div>
        </div>

        <div class="form-group">
            <label class="col-xs-3 control-label">多选</label>
            <div class="col-xs-offset-3 col-xs-9 checkbox">
                <label><input type="checkbox">选项1</label>
                <label><input type="checkbox">选项2</label>
            </div>
            <div class="col-xs-offset-3 col-xs-9 checkbox">
                <label><input type="checkbox">选项1</label>
                <label><input type="checkbox">选项2</label>
            </div>
        </div>

        <div class="form-group">
            <label class="col-xs-3 control-label">Email</label>
            <div class="col-xs-9">
                <p class="form-control-static">email@example.com</p>
            </div>
        </div>

        <div class="form-group">
            <label class="col-xs-3 control-label" for="inputPassword">密码</label>
            <div class="col-xs-9">
                <input type="text" placeholder="请输入密码" class="form-control" id="inputPassword">
            </div>
        </div>

        <div class="form-group">
            <label class="col-xs-3 control-label">聚焦</label>
            <div class="col-xs-9">
                <input type="text" value="该输入框获得焦点。。。">
            </div>
        </div>

        <div class="form-group">
            <label class="col-xs-3 control-label">禁用</label>
            <div class="col-xs-9">
                <input type="text" placeholder="该输入框禁止输入" disabled>
            </div>
        </div>

        <fieldset disabled>
            <div class="form-group">
                <label for="disabledTextInput" class="col-xs-3 control-label">禁用输入</label>
                <div class="col-xs-9">
                    <input type="text" id="disabledTextInput" class="form-control" placeholder="禁止输入">
                </div>
            </div>

            <div class="form-group">
                <label class="col-xs-3 control-label" for="disabledSelect">禁用选择菜单</label>
                <div class="col-xs-9">
                    <select id="disabledSelect" class="form-control">
                        <option>禁止选择</option>
                    </select>
                </div>
            </div>
        </fieldset>

        <div class="form-group has-success">
            <label class="col-xs-3 control-label" for="success">输入成功</label>
            <div class="col-xs-9">
                <input type="text" id="success" class="form-control">
            </div>
        </div>

        <div class="form-group has-warning">
            <label class="col-xs-3 control-label" for="warning">输入警告</label>
            <div class="col-xs-9">
                <input type="text" id="warning" class="form-control">
            </div>
        </div>

        <div class="form-group has-error">
            <label class="col-xs-3 control-label" for="error">输入错误</label>
            <div class="col-xs-9">
                <input class="form-control" type="text" id="error">
            </div>
        </div>

        <div class="form-group">
            <input type="text" class="form-control input-lg" placeholder="input-lg">
        </div>

        <div class="form-group">
            <input type="text" class="form-control input-sm" placeholder="input-sm">
        </div>

        <div class="form-group">
            <select class="form-control input-lg">
                <option>input-lg</option>
            </select>
        </div>

        <div class="form-group">
            <select class="form-control input-sm">
                <option>input-sm</option>
            </select>
        </div>

        <div class="row">
            <div class="col-lg-2">
                <input type="text" class="form-control" placeholder="col-lg-2">
            </div>
            <div class="col-lg-3">
                <input type="text" class="form-control" placeholder="col-lg-3">
            </div>
            <div class="col-lg-4">
                <input type="text" class="form-control" placeholder="col-lg-4">
            </div>
        </div>

        <div class="form-group">
            <input type="text" class="form-control">
            <span class="help-block">一个较长的帮助文本块超过一行，需要扩展到下一行。本实例中的帮助文本总共有两行。</span>
        </div>


        <div class="form-group">
            <div class="col-xs-offset-3 col-xs-9">
                <button type="submit" class="btn-default btn">提交</button>
            </div>
        </div>
    </form>
</div>


<script src="jquery-3.2.1.js"></script>
<script src="bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
</body>
</html>